package com.hkts.naturalgas.serviceimpl;

import com.hkts.naturalgas.dao.BookDao1;
import com.hkts.naturalgas.entity.Book;
import com.hkts.naturalgas.plcdao.BookDao2;
import com.hkts.naturalgas.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
public class BookServiceImpl implements BookService {
   @Autowired
   private BookDao1 dao1;
    @Autowired
    private BookDao2 dao2;
    @Override
    public List<Book> findall() {
        List<Book> all = dao1.findAll();
        List<Book> all1 = dao2.findAll();
        all.addAll(all1);
        return all;
    }
}
